/**
 * @Author: Your name
 * @Date:   2024-03-15 16:19:25
 * @Last Modified by:   Your name
 * @Last Modified time: 2024-03-15 16:19:30
 */
import React, { Component } from 'react';

class ChatMessage extends Component {
  render() {
    const { message } = this.props;
    return (
      <div
        className={`p-2 ${message.from === 'Me' ? 'text-right' : 'text-left'}`}
      >
        <div className="inline-block bg-gray-200 px-4 py-2 rounded-md">
          {message.content}
        </div>
      </div>
    );
  }
}

export default ChatMessage;
